﻿<%@ page 
language="java" 
import="java.util.*" 
import="com.csd.pojo.ProjectType" 
pageEncoding="UTF-8"
%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List<ProjectType> projList = (List<ProjectType>)request.getAttribute("listOfProjectType");

Boolean enableApply = (Boolean) request.getAttribute("enableApply");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>项目申请</title>
<link href="<%=path %>/student/css/student_right.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="main">
        <h1>项目申请</h1>
        <hr />
        <h3>&nbsp;</h3>
        <table width="100%">
            <tr>
                <td class="table_head" >项目类型</td>
                <td class="table_head" >类型描述</td>
                <td class="table_head">团队成员人数限制</td>
                <td class="table_head" >操作</td>
            </tr>
            <%
            if(projList!=null)
            {

	            for(ProjectType item : projList)
	            {
             %>
            <tr>
                <td><%=item.getName() %></td>
                <td><%=item.getDescription() %></td>
                <td><%=item.getMaxiMemberNumber() %></td>
                <td>
                	<%if(enableApply!=null && enableApply){ %>
                		<a href="Javascript:window.location='teamShow.action?projectTypeID=<%=item.getId() %>'">申请</a>
                	<%}else{ %>
                		<span>不可申请</span>
                	<%} %>
                </td>
            </tr>
            <%	}
            }else
            { 
            %>
           	<tr>
            	<td colspan="2">暂无项目可供申请</td>
            </tr>
            <%}%>
        </table>
    </div>
</body>
</html>

